
export function getRealIp(socket) {
    if (socket.handshake.headers['x-forwarded-for'] != null) {
        return socket.handshake.headers['x-forwarded-for'];
    } else {
        return socket.handshake.address;
    }
}

export class User {
  name = ''
  svip = false
  online = true
  id = ''

  constructor(name, svip, socketid) {
    this.name = name
    this.svip = svip
    this.id = socketid
  }

  clientAccess() {
    return {
      name: this.name,
      svip: this.svip
    }
  }
}
